.chat-container {
    width: 400px;
    height: 600px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 15px;
    background: #5865F2;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-avatar {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5865F2;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
}

.online {
    background: #43B581;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    /*max-height: 500px; !* 设置合理高度 *!*/
    background: #F5F5F5;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-content {
    padding: 10px 15px;
    border-radius: 18px;
    word-break: break-word;
}

.user-message {
    margin-left: auto;
    text-align: right;
}

.user-message .message-content {
    background: #DCF8C6;
    border-top-right-radius: 4px;
}

.ai-message .message-content {
    background: white;
    border-top-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.chat-input {
    padding: 10px;
    border-top: 1px solid #eee;
    background: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-tools {
    color: #7D7D7D;
    display: flex;
    gap: 10px;
}

#message-input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    overflow-y: auto;
}

#message-input:empty:before {
    content: attr(placeholder);
    color: #999;
}

#send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #5865F2;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

#send-btn:hover {
    background: #4752C4;
}